<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
<link rel="stylesheet" th:href="@{/lib/zTree_v3/css/zTreeStyle/zTreeStyle.css}" type="text/css">
</head>
<body>
    <div class="layui-form timo-compile">
    <form th:action="@{/groupMgr/team/save}">
        <input type="hidden" name="id" th:if="${team}" th:value="${team.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">名称</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="teamName" placeholder="请输入名称" th:value="${team?.teamName}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">所属部门ID</label>
            <div class="layui-input-inline">
                 <input class="layui-input select-tree"
                      th:attr="data-url=@{/system/dept/list}, data-value=${team?.dept?.id}" th:value="${team?.dept?.title}"
                      type="text" name="dept" placeholder="请选择部门">
                      
            </div>
            
           <!-- <div class="layui-input-block">
               <input class="layui-input select-tree"
                      th:attr="data-url=@{/system/dept/list}, data-value=${dept?.id}" th:value="${dept?.title}"
                      type="text" name="dept" placeholder="请选择部门">
           </div> -->
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">组织类型</label>
            <div class="layui-input-inline" style="width:90px;">
                <!-- <input class="layui-input" type="text" name="teamType" placeholder="请输入团队/小组" th:value="${team?.teamType}"> -->
                <div class="timo-search-status">
                   <select  name="teamType" mo:dict="TEAM_TYPE" mo-selected="${team?.teamType}"></select>
               	</div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">业务类型</label>
            <!-- <div class="layui-input-inline">
                <input class="layui-input" type="text" name="userBusiType" placeholder="请输入所属类型" th:value="${team?.userBusiType}">
            </div> -->
            <div class="layui-input-inline">
            	<div class="timo-search-status" style="width:80px;padding-right: 0px;">
                   <select  style="width:80px;padding-right: 0px;" name="userBusiType" mo:dict="USER_BUSI_TYPE" mo-selected="userBusiType"></select>
               	</div>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" class="layui-textarea" name="remark">[[${team?.remark}]]</textarea>
            </div>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>
<script type="text/javascript" th:src="@{/js/plugins/jquery-2.2.4.min.js}"></script>
<script type="text/javascript" th:src="@{/lib/zTree_v3/js/jquery.ztree.core.min.js}"></script>
<script type="text/javascript" th:src="@{/lib/zTree_v3/js/jquery.ztree.exedit.min.js}"></script>
<script type="text/javascript" th:src="@{/js/timoTree.js}"></script>
<script type="text/javascript">
    var local = window.localStorage;
    // 树形菜单
    $.fn.selectTree({
        rootTree: '全部',
        onSelected: function (treeNode) {
            local.setItem('deptTitle', treeNode.name);
        }
    });
</script>
</body>
</html>